home *** CD-ROM | disk | FTP | other *** search
/ Acorn User: China / Acorn User China CD-ROM (UK) (Disc B) / Acorn User China CD-ROM (UK) (Disc B).bin / STUTTGART / TEX-UTIL / SEMTEX / Extras_TeX < prev   
Encoding:
Text File  |  1994-12-20  |  3.2 KB  |  98 lines

  1. # StrongEd mode for TeX/LaTeX files
  2. #
  3. # Features:
  4. #   ⇧F2      lists LaTeX sections
  5. #   F10      saves the file and runs it through LaTeX
  6. #   ^G       searches for the definition of a command
  7. #   ⇧^G      searches for the definition of a label
  8. #   ^H       loads the include'd file under the cursor
  9. #   ^K       wraps (removes linefeeds) until the end of the current paragraph
  10. #   ^K^K     unwraps (formats lines) until the end of the current paragraph
  11. #   ^Return  indents new line including LaTeX tabs ('\>' commands)
  12. #
  13. # plus shortcuts for LaTeX environments (listed at the end of this file)
  14. #
  15.  
  16. Search
  17.     _MarkWord    (["\\"] {AlphaNum}+) | {Punct}+
  18. #    _MoveWord    _MarkWord
  19.     CmdDef        ("\\def" CW @0) | ("\\renewcommand{" CW "}" @0) | ("\\newcommand{" CW "}" @0) | ("\\renewenvironment{" CW "}" @0) | ("\\newenvironment{" CW "}" @0)
  20.     _Indent2    {" "} [ {"\\>" {" "}} ]
  21.     Sect        "\\chapter" | "\\section" | "\\subsection" | "\\subsubsection"
  22.     Label        "\\label{" @0 { Any ~ "}" } Any @9 "}" 
  23.     LabelDef    "\\label{" CW  "}"
  24.     _Wrap        ~NL Any @1 {" "} NL ~ NL|"\t"|" "
  25.     TeXpar        NL ( NL | "\\begin" | "\\end" | "\\item" | "%" | "\\[" )
  26. End
  27.  
  28. Replace
  29.     _rwrap        @01 " "
  30. End
  31.  
  32. KeyList
  33.     ^Return        NewLine(indent,_Indent2)
  34. End
  35.  
  36. Functions
  37.  
  38.     Key    ⇧F2
  39.     Menu    List sections  ⇧F2
  40.     Icon    LoF
  41.     Select    ListOfFound (Sect,Text,Align,Line,Case)
  42.     Help    Click Select to generate list of \\chapters, \\sections, etc.|MClick Adjust for a list of \\labels.
  43.  
  44.     Adjust    ListOfFound (Label,Text,Whole,NoLine,Case)
  45.  
  46.     Key    ^H
  47.     Icon    save
  48.     Select    LoadOne ("<tmp$path>.^.<tmp$word>.tex","<tmp$path>.^.<tmp$word>.sty","TexInputs:<tmp$word>")
  49.     Help    Click Select to load the include-file under the cursor.|MClick Adjust to load the log file.
  50.  
  51.     Adjust    LoadOne ("<tmp$path>.log")
  52.  
  53.     Key    F10
  54.     Menu    Save & Run  F10
  55.     Icon    Run
  56.     Select    Run("Dir <tmp$path>.^") SaveRun("TaskWindow |\"<TeX$Dir>.Bin.LaTeX <tmp$path>.<tmp$leaf>|\" -wimpslot 896k -name LaTeX -display -quit")
  57.     Help    Click to save text and run it through LaTeX.|MAdjust does same and opens the directory.
  58.  
  59.     Adjust    Run("Dir <tmp$path>.^") SaveRun("TaskWindow |\"<TeX$Dir>.Bin.LaTeX <tmp$path>.<tmp$leaf>|\" -wimpslot 896k -name LaTeX -display -quit") Run("Filer_OpenDir <tmp$path>")
  60.  
  61.     Key    ^G
  62.     Menu    Goto def.  ^G
  63.     Icon    goto
  64.     Select    Push ListOfFound (CmdDef,All,Whole,Line,Case,GotoFound)
  65.     Help    Select: Goto definition of command.|MAdjust: Goto Label.|MWith Shift: Go back where you came from.
  66.  
  67.     Key    ^⇧G
  68.     Adjust    Push ListOfFound (LabelDef,All,Whole,Line,Case,GotoFound)
  69.  
  70.     Key    ^G 2
  71.     ⇧Select    Pop
  72.  
  73.     Key    ^⇧G 2
  74.     ⇧Adjust    Pop
  75.  
  76.     Menu    Wrap  ^K
  77.     Key    ^K
  78.     Help    Join lines together
  79.     Select    Push StartOfWLine BlockMark_Standard ListOfFound(TeXpar,Text,Whole,NoLine,Case,GotoNext) BlockMark_Standard Pop Replace (_wrap,_rwrap,Block,Noline) BlockClear
  80.  
  81.     Menu    Format  ^K^K
  82.     Key    ^K 2
  83.     Help    Format paragraph
  84.     Select    Push StartOfWLine BlockMark_Standard ListOfFound(TeXpar,Text,Whole,NoLine,Case,GotoNext) BlockMark_Standard Pop Unwrap BlockClear
  85.  
  86. End
  87.  
  88. Shortcuts
  89.     \bi.    \\begin{itemize}\n\\item \@\n\i\\end{itemize}
  90.     \bd.    \\begin{description}\n\\item[\@]\n\i\\end{description}
  91.     \be.    \\begin{enumerate}\n\\item \@\n\i\\end{enumerate}
  92.     \bl.    \\begin{lemma}\n\@\n\i\\end{lemma}
  93.     \bp.    \\begin{proof}\n\@\n\i\\end{proof}
  94.     \bt.    \\begin{theorem}\n\@\n\i\\end{theorem}
  95.     \em.    {\\em \@}
  96.     \[.    \\[\n\@\n\\]
  97. End
  98.